package top.wardyan.wbaseswt.control.wtable;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;

import com.jfinal.plugin.activerecord.IRow;

public class WTableItem extends TableItem{
	
	
	// protected BaseModel<? extends BaseModel<?>> model;
	protected IRow<? extends IRow<?>> model;
	
	public WTableItem(Table parent, int style, int index) {
		super(parent, style, index);
	}
	public WTableItem(Table parent, int style) {
		super(parent, style);
	}
	
	public WTableItem(Table parent, String[] text) {
		this(parent, SWT.NONE, text);
	}
	public WTableItem(Table parent, int style, String[] text) {
		super(parent, style);
		this.setText(text);
	}

	@Override
	protected void checkSubclass() {}
	
	public IRow<? extends IRow<?>> getModel() {
		return model;
	}
	public WTableItem setModel(IRow<? extends IRow<?>> model) {
		this.model = model;
		return this;
	}
}

